<script setup lang='ts'>
  import HomePanel from './HomePanel.vue'
  import useStore from '@/store';
  const { home } = useStore()
  home.getHotList()
</script>

<template>
    <HomePanel title="人气推荐" sub-title="人气爆款 不容错过" >
        <template #right>
          <xtx-more path="/"></xtx-more>
        </template>
          <ul class="goods-list">
        <li v-for="ele in home.hotList" :key="ele.id">
          <RouterLink to="/">
            <img
              v-Lazy="ele.picture"
              alt=""
            />
            <p class="name ellipsis">{{ ele.title }}</p>
            <p class="price">{{ ele.alt }}</p>
          </RouterLink>
        </li>
      </ul>
      </HomePanel>
</template>

<style scoped lang="less">
.goods-list {
  display: flex;
  justify-content: space-between;
  height: 406px;
  li {
    width: 306px;
    height: 406px;
    background: #fff;
    .hoverShadow();
    img {
      width: 306px;
      height: 306px;
    }
    p {
      font-size: 18px;
      padding: 12px 30px 0 30px;
      text-align: center;
    }
    .price {
      color: #999;
    }
  }
}
</style>